package com.mjlf.spring;

import com.mjlf.spring.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;

/**
 * @ClassName TestXmlConfig
 * @auther mjlf
 * @Date 2019/6/27 10:32
 * @Description TODO
 */
public class TestXmlConfig {

    public static void main(String[] args) {
        GenericXmlApplicationContext applicationContext = new GenericXmlApplicationContext("classpath:spring.xml");
        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.count();
    }
}
